﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.SharePoint;

namespace WSPHelper.VSExtensions.Core
{

    static class ExtensionMethods
    {
        internal static string StringJoin(this IEnumerable<string> list, string separator = "")
        {
            return String.Join(separator, list.ToArray());
        }


        // TODO: temporary
        internal static void Log(this ISharePointProjectService svc, string msg)
        {
            svc.Logger.WriteLine(msg, LogCategory.Status);
        }


        internal static void LogVar(this ISharePointProjectService svc, string varName, string varValue)
        {
            svc.Log(varName + " = " + varValue);
        }
    }

}
